# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ktimer
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/utilities/org.kde.ktimer"
pkgdesc="A little tool to execute programs after some time"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev kdoctools-dev ki18n-dev kwidgetsaddons-dev kio-dev kdbusaddons-dev knotifications-dev kconfig-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/ktimer-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="313ff9e8627cb0553c6e4a9b60349a842c016f9f20f952bcf1347c2500641242f095226e85eb66330a6d6d5292de8d0b26ef74127ac17e226337324e3f517eb6  ktimer-20.04.3.tar.xz"
